<template>
  <div>
    <!-- 要缓存的路由 -->
    <keep-alive>
      <router-view v-if="$route.meta.keepAlive"></router-view>
    </keep-alive>
    <!-- 不缓存的vue -->
    <router-view v-if="!$route.meta.keepAlive"></router-view>
  </div>
</template>

<script>

export default {
  name: 'App',
  created () {
    this.$store.commit('initUser')
  }
}
</script>
<style lang="scss">

</style>
